<?php
namespace app\common\model;
use app\common\model\CommonModel;
use think\Db;

class Access extends CommonModel
{
	/**
	* 关联角色
	*/
	public function serAccess($data)
	{
		return $this->insertAll($data);
	}
	/**
	* 获取当前账号角色
	*/
	public function getAccessArr($where,$field)
	{
		return $this->where($where)->column($field);
	}
	/**
	* 删除
	*/
	public function delAccess($aid,$agidarr)
	{
		return $this->where('admin_id',$aid)->where('agid','in',$agidarr)->delete();
	}
}
